package com.industry.examinaion.dal.dataobject;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.industry.framework.core.annountions.record.IdooRecordBizType;
import com.industry.framework.core.annountions.record.IdooRecordProperty;
import com.industry.system.dal.dataobject.BaseEntity;

import java.io.Serial;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 试卷表
 * </p>
 *
 * @author nbZhuoZh
 * @since 2025-07-01
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("examinaion_paper")
@IdooRecordBizType
public class ExaminaionPaper extends BaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 租户编号
     */
    private String tenantId;

    /**
     * 部门ID；空则为公共客户数据
     */
    private String deptId;

    /**
     * 所属用户id
     */
    private String belongsUserId;

    /**
     * 所属用户名称
     */
    private String belongsUserName;

    /**
     * 试卷标题
     */
    @IdooRecordProperty("试卷标题")
    private String title;

    /**
     * 状态: 0-未开始, 1-进行中, 2-已提交, 3-已批改
     */
    @IdooRecordProperty("试卷状态")
    private String status;

    /**
     * 总分
     */
    @IdooRecordProperty(value = "总分" , idooSelector = false)
    private BigDecimal score;

    /**
     * 开始时间
     */
    @IdooRecordProperty(value = "下发时间" , idooSelector = false)
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    /**
     * 提交时间
     */
    @IdooRecordProperty(value = "提交时间" , idooSelector = false)
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime submitTime;

    /**
     * 删除标记
     */
    @TableLogic
    private String delFlag;

    /**
     * 创建部门
     */
    private String createDept;
}
